package com.itheima.innerClass.test3;

public class Test3Innerclass {
    /*
        静态成员内部类演示
     */
    public static void main(String[] args) {
        // 外部类名.内部类名 对象名 = new 外部类名.内部类名();
        Outer.Inner oi = new Outer().new Inner();
        oi.show();

    }
}

class Outer {
    private int age = 20;

     class Inner {
        private int age = 15;

        public void show(){
            int age = 30;
            //需求1: 打印出 30
            System.out.println(age);
            //需求2: 打印出 15
            System.out.println(this.age);

            //需求3: 打印出 20
            Outer outer = new Outer();
            System.out.println(outer.age);
            System.out.println(Outer.this.age);
            System.out.println("inner..show");
        }

        public  void method(){
            System.out.println("inner..method");
        }
    }
}